home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cmdline.lha / cmdline / src / cmd / Makefile < prev    next >
Encoding:
Makefile  |  1992-08-03  |  3.2 KB  |  120 lines

  1. ##########################################################################
  2. ## ^FILE: Makefile - make file for the cmdparse program
  3. ##
  4. ## ^DESCRIPTION:
  5. ##    This is the makefile that is used to build and install the "cmdparse"
  6. ##    program. In order to get cmdparse to build on your system you may
  7. ##    need to change some of the "variables" mentioned below. You may also
  8. ##    need to redefine some of the commands that are used.
  9. ##
  10. ## ^TARGETS:
  11. ##    all     : make the cmdparse program
  12. ##    program : same as "all"
  13. ##    install : build and install the cmdparse program
  14. ##    clean   : remove all intermediate files generated by the build
  15. ##    clobber : remove all files generated by the build
  16. ##
  17. ## ^VARIABLES:
  18. ##    OS         : specify the host operating system (default=unix)
  19. ##    FLAG       : debugging/optimization flags to the compiler (default=-g)
  20. ##    TESTDEFS   : #defines used for testing
  21. ##    USRDEFS    : #defines flags used for building (default=unix)
  22. ##    OPTIONS    : any other compiler flags to use
  23. ##
  24. ## ^HISTORY:
  25. ##    04/10/92    Brad Appleton    <brad@ssd.csd.harris.com>    Created
  26. ###^^#####################################################################
  27.  
  28. include ../../Config.mk
  29.  
  30. ###
  31. # operating-system dependent stuff
  32. ###
  33. OS=unix
  34. # OSDEFS=$(DEF)$(OS) $(DEF)$(.UNIVERSE)_universe
  35.  
  36. ##
  37. # Programs
  38. ##
  39. PROGRAM=$(PROGNAME)$(EXECEXT)
  40.  
  41. ###
  42. # Program Libraries
  43. ###
  44. PROGLIB=$(PROGLIBDIR)lib$(LIBNAME)$(LIBEXT)
  45.  
  46. ###
  47. # compilation options
  48. ###
  49. INCLUDES=$(INC)$(PROGLIBDIR)
  50. FLAG=$(OPT)
  51. # FLAG=$(DBG)
  52. TESTDEFS=
  53. USRDEFS=
  54. DEFINES=$(OSDEFS) $(USRDEFS) $(TESTDEFS)
  55. OPTIONS=
  56. CFLAGS=$(FLAG) $(INCLUDES) $(DEFINES) $(OPTIONS)
  57.  
  58. ###
  59. # files used
  60. ###
  61. OBJS= argtypes$(OBJEXT) cmdparse$(OBJEXT) fsm$(OBJEXT) main$(OBJEXT) \
  62.    quoted$(OBJEXT) shell_arg$(OBJEXT) shells$(OBJEXT) syntax$(OBJEXT)
  63.  
  64. PROGLIB=$(PROGLIBDIR)libcmdline$(LIBEXT)
  65.  
  66. ###
  67. # target dependencies
  68. ###
  69. all: program
  70.  
  71. program: library $(PROGRAM)
  72.  
  73. library:
  74.     ( $(CHDIR) $(PROGLIBDIR) ; $(BUILD) $@ ; )
  75.  
  76. $(PROGRAM): $(OBJS)
  77.     $(CC) $(EXE)$@ $(OBJS) $(PROGLIB)
  78.  
  79. ###
  80. # maintenance dependencies
  81. ###
  82. install: $(PROGRAM) $(BINDIR) $(PROGRAM).pl
  83.     -$(RM) $(BINDIR)$(PROGRAM) $(PERLLIB)$(PROGRAM).pl $(TCLLIB)$(PROGRAM).tcl
  84.     $(CP) $(PROGRAM)  $(BINDIR)$(PROGRAM)
  85.     $(STRIP) $(BINDIR)$(PROGRAM)
  86.     -$(CP) $(PROGRAM).pl $(PERLLIB)$(PROGRAM).pl
  87.     -$(CP) $(PROGRAM).tcl $(TCLLIB)$(PROGRAM).tcl
  88.  
  89. clean:
  90.     -$(RM) *$(OBJEXT) core .exrc *~ \#*\#
  91.  
  92. clobber: clean
  93.     -$(RM) *$(LIBEXT) $(PROGRAM) tags TAGS
  94.  
  95. ###
  96. # object dependencies
  97. ###
  98. argtypes$(OBJEXT) : argtypes$(CEXT) argtypes.h shell_arg.h \
  99.    $(PROGLIBDIR)cmdargs.h $(PROGLIBDIR)cmdline.h shells.h
  100.  
  101. cmdparse$(OBJEXT) : cmdparse$(CEXT) argtypes.h shell_arg.h \
  102.    $(PROGLIBDIR)cmdargs.h $(PROGLIBDIR)cmdline.h shells.h cmdparse.h \
  103.    syntax.h fsm.h quoted.h
  104.  
  105. fsm$(OBJEXT) : fsm$(CEXT) fsm.h
  106.  
  107. main$(OBJEXT) : main$(CEXT) $(PROGLIBDIR)cmdline.h cmdparse.h \
  108.    $(PROGLIBDIR)cmdargs.h
  109.  
  110. quoted$(OBJEXT) : quoted$(CEXT) quoted.h
  111.  
  112. shell_arg$(OBJEXT) : shell_arg$(CEXT) shell_arg.h $(PROGLIBDIR)cmdargs.h \
  113.    $(PROGLIBDIR)cmdline.h shells.h
  114.  
  115. shells$(OBJEXT) : shells$(CEXT) $(PROGLIBDIR)fifolist.h shells.h \
  116.    argtypes.h shell_arg.h $(PROGLIBDIR)cmdargs.h $(PROGLIBDIR)cmdline.h
  117.  
  118. syntax$(OBJEXT) : syntax$(CEXT) $(PROGLIBDIR)cmdline.h syntax.h fsm.h \
  119.    quoted.h
  120.